//
//  NSMutableDictionary+Publicdic.m
//  DTSTON
//
//  Created by 喻贵华 on 16/5/5.
//  Copyright © 2016年 Demo. All rights reserved.
//

#import "NSMutableDictionary+Publicdic.h"

@implementation NSMutableDictionary (Publicdic)
+(NSMutableDictionary*)getPubdic
{
    long long timestamp = time(NULL);
    NSString *time = [NSString stringWithFormat:@"%lld",timestamp ];
    
    NSDictionary *info=[[NSBundle mainBundle] infoDictionary];
    NSLog(@"%@,%@",EXRACT_OBJECT(UID),EXRACT_OBJECT(TOKEN));
    
    NSDictionary *dic=@{@"productId":DTCloudKitAppId,
                        @"mac":[UIDevice currentDevice].identifierForVendor.UUIDString,
                        @"platform":@"2",
                        @"rtime":time,
                        @"version":info[@"CFBundleShortVersionString"],
                        @"uid":EXRACT_OBJECT(UID),
                        @"token":EXRACT_OBJECT(TOKEN)
                        };
    return [NSMutableDictionary dictionaryWithDictionary:dic];

  /*  long long timestamp=time(NULL);
    NSString *time=[NSString
                    stringWithFormat:@"%lld",timestamp ];
    NSDictionary *info=[[NSBundle mainBundle]infoDictionary];
    NSLog(@"%@,%@",EXRACT_OBJECT(TOKEN),EXRACT_OBJECT(UID));
    NSDictionary *dic=@{@"productId":PRODUCTID,@"mac":MAC,@"platform":@"2",@"rtime":time,@"version":info[@"CFBundleShortVersionString"],@"uid":EXRACT_OBJECT(UID),@"token":EXRACT_OBJECT(TOKEN)};
    return [NSMutableDictionary dictionaryWithDictionary:dic];
   */
}
+(NSMutableDictionary*)getPubdicGuest
{
    long long timestamp = time(NULL);
    NSString *time = [NSString stringWithFormat:@"%lld",timestamp];
    
    NSDictionary *info=[[NSBundle mainBundle] infoDictionary];
    NSDictionary *dic=@{@"productId":DTCloudKitAppId,
                        @"mac":MAC,
                        @"version":info[@"CFBundleShortVersionString"],
                        @"rtime":time,
                        @"platform":@"2"
                        };
    return [NSMutableDictionary dictionaryWithDictionary:dic];
}
@end
